Most mobile devices are equipped with built in accelerometers, which are useful for determining the orientation of the device as well as in detecting sharp movements, such as the shaking of the device.